//
//  GeneralSettingsModule.m
//  Cantrip
//
//  Created by James Callender on Tue May 07 2002.
//  Copyright (c) 2001 James Callender. All rights reserved.
//

#import "GeneralSettingsModule.h"

@implementation GeneralSettingsModule

- (id)init
{
    if (self = [super init]) {
        [NSBundle loadNibNamed:@"GeneralSettingsView" owner:self];
    }
    
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

- (void)awakeFromNib
{
    
}

- (NSString *)settingsDisplayName
{
    return @"General";
}

- (NSImage *)settingsDisplayIcon
{
    return [NSImage imageNamed:@"Settings.psd"];
}

- (NSView *)settingsView
{
    return oSettingsView;
}

- (NSSize)size
{
    return NSMakeSize(526, 121);
}

- (NSSize)minSize
{
    return [self size];
}

- (id)world
{
    return currentWorld;
}

- (void)updateForWorld:(id)world
{
    if (world != currentWorld) {
	[self willChangeValueForKey:@"world"];
	currentWorld = world;
	[self didChangeValueForKey:@"world"];
    }
    
}

- (NSDictionary *)defaultWorldProperties
{
    return [NSDictionary dictionaryWithObjectsAndKeys:
	[NSNumber numberWithBool:NO], @"enableClearInput",
	[NSNumber numberWithBool:YES], @"enableSmartScrolling",
	[NSNumber numberWithBool:YES], @"enableSpellChecking",
	[NSNumber numberWithBool:YES], @"enableSmartInsertDelete",
	[NSNumber numberWithInt:1], @"echoStyle",
	nil];
}

@end
